@workerdeck/ui 0.21.0 → 0.22.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. package/README.md +3 -2
  2. package/build/{SessionPanel-BjNAnWMF.d.mts → SessionPanel-13l25ubU.d.mts} +15 -5
  3. package/build/{SessionPanel-DNuPKg5c.mjs → SessionPanel-DgwjH4Ve.mjs} +624 -221
  4. package/build/SessionPanel-DgwjH4Ve.mjs.map +1 -0
  5. package/build/index.d.mts +54 -21
  6. package/build/index.mjs +7 -6
  7. package/build/index.mjs.map +1 -1
  8. package/build/scoped.css +3547 -0
  9. package/build/workspace.d.mts +1 -1
  10. package/build/workspace.mjs +1 -1
  11. package/package.json +10 -6
  12. package/src/components/agent/Composer.tsx +10 -10
  13. package/src/components/agent/ContextDialog.tsx +3 -2
  14. package/src/components/agent/Conversation.tsx +1 -1
  15. package/src/components/agent/McpDialog.tsx +3 -1
  16. package/src/components/agent/Scrubber.tsx +248 -0
  17. package/src/components/agent/SessionList.tsx +3 -1
  18. package/src/components/agent/SessionPanel.tsx +20 -7
  19. package/src/components/agent/SessionSteps.tsx +10 -4
  20. package/src/components/agent/SkillsDialog.tsx +3 -2
  21. package/src/components/agent/StatusBar.tsx +1 -1
  22. package/src/components/agent/Transcript.tsx +147 -73
  23. package/src/components/agent/UsageDialog.tsx +3 -1
  24. package/src/components/agent/scrubber-marks.ts +277 -0
  25. package/src/components/terminal/PermissionPrompt.tsx +3 -0
  26. package/src/components/terminal/QuestionPrompt.tsx +3 -0
  27. package/src/components/terminal/StatusLine.tsx +3 -1
  28. package/src/components/ui/AlertDialog.tsx +23 -20
  29. package/src/components/ui/Dialog.tsx +26 -23
  30. package/src/components/ui/Menu.tsx +20 -17
  31. package/src/components/ui/PortalScope.tsx +27 -0
  32. package/src/components/ui/Select.tsx +19 -16
  33. package/src/components/ui/Tooltip.tsx +13 -10
  34. package/src/styles/scoped.entry.css +16 -0
  35. package/src/styles/terminal.css +1 -1
  36. package/src/styles/theme.css +160 -0
  37. package/build/SessionPanel-DNuPKg5c.mjs.map +0 -1
package/README.md CHANGED
@@ -127,9 +127,10 @@ lose by forgetting a second mount isn't one.
127
127
  scoping — file an issue with your case.
128
128
  - Dark mode is driven **only** by `[data-theme='dark']` on the root element (the Tailwind
129
129
  `dark:` variant is remapped to it); `prefers-color-scheme` is not consulted at CSS level.
130
- - The session surface centers its content at `--wd-content-max-w` (default `48rem`).
130
+ - The session surface centers its content at `--wd-transcript-max-width` (default `48rem`).
131
131
  Embedders in narrow docks (a VS Code bottom panel, a drawer) set it to `100%` for
132
- edge-to-edge content. Every component also carries `data-slot` attributes for targeted
132
+ edge-to-edge content. Other geometry tokens: `--wd-status-bar-height`, `--wd-composer-padding`,
133
+ `--wd-transcript-row-gap`. Every component also carries `data-slot` attributes for targeted
133
134
  overrides — e.g. `[data-slot='composer-hint']` is the "Enter to send" line, which a host
134
135
  whose vertical space is precious can `display: none`.
135
136
  - `SessionPanel` can hand its dialog surfaces to the embedder: `panelSurface: 'external'`
@@ -389,10 +389,10 @@ interface SessionPanelProps {
389
389
  */
390
390
  onSubagentChange?: (toolUseId: string | undefined) => void;
391
391
  /**
392
- * Terminal theme only: hold the prompt of the turn you are reading at the top
393
- * of the transcript, as the Claude Code CLI does. The **real row** is pinned
394
- * rather than a copy drawn above it, so it lines up with the rows beneath by
395
- * construction see `TranscriptRows`.
392
+ * Hold the prompt of the turn you are reading at the top of the transcript.
393
+ * Works in both variants: the terminal clips to one line (as the CLI does),
394
+ * cards shows a frosted bar. The **real row** is pinned rather than a copy
395
+ * drawn above it, so it lines up with the rows beneath by construction.
396
396
  */
397
397
  stickyPrompt?: boolean;
398
398
  /**
@@ -505,6 +505,12 @@ interface SessionPanelProps {
505
505
  * the client cannot see.
506
506
  */
507
507
  cacheTranscript?: boolean;
508
+ /**
509
+ * Replaces the default empty state when the transcript has no messages. Pass
510
+ * your product's own onboarding content instead of WorkerDeck's generic
511
+ * "`>_` Tell the agent what to do." placeholder.
512
+ */
513
+ emptyState?: ReactNode;
508
514
  className?: string;
509
515
  }
510
516
  /** What an embedder needs to *change* a session it doesn't own the attach for. */
@@ -555,6 +561,9 @@ type SessionVitals = {
555
561
  * as its "seen" watermark while the panel is actually on screen, and compares
556
562
  * against later to know what is new. */
557
563
  itemCount: number;
564
+ /** Session-cumulative cost in USD. The internal status bar renders this via
565
+ * `formatCost`; an external host needs it to reproduce that reading. */
566
+ totalCostUsd: number;
558
567
  };
559
568
  /**
560
569
  * The all-in-one embeddable session surface: status bar, streaming transcript,
@@ -592,8 +601,9 @@ declare function SessionPanel({
592
601
  readOnly,
593
602
  toolHost,
594
603
  cacheTranscript,
604
+ emptyState,
595
605
  className
596
606
  }: SessionPanelProps): _$react.JSX.Element;
597
607
  //#endregion
598
608
  export { permissionModeChoices as C, PermissionModeSelectProps as S, useAffordances as _, SessionVitals as a, PermissionModeMeta as b, TranscriptDensityProvider as c, TranscriptVariantProvider as d, useTranscriptDensity as f, WithActions as g, TerminalAffordances as h, SessionSurfacePanel as i, TranscriptFont as l, CopyAction as m, SessionPanel as n, TerminalMetrics as o, useTranscriptVariant as p, SessionPanelProps as r, TranscriptDensity as s, SessionControls as t, TranscriptVariant as u, PERMISSION_MODES as v, permissionModeMeta as w, PermissionModeSelect as x, PermissionModeChoice as y };
599
- //# sourceMappingURL=SessionPanel-BjNAnWMF.d.mts.map
609
+ //# sourceMappingURL=SessionPanel-13l25ubU.d.mts.map